<template>
  <header class="header flex-cnt-btwn">
    <div class="btn-group">
      <slot name="left"></slot>
    </div>
    <div class="title">
      <p class="maintitle txt_overflow">{{title}}</p>
      <template v-if="subtitle != ''">
        <p class="subtitle">{{subtitle}}</p>
      </template>
    </div>
    <div class="btn-group">
      <slot name="right"></slot>
    </div>
  </header>
</template>

<script>
  export default {
    name: 'header',
    props: ['isfixed', 'title', 'subtitle']
  }
</script>

<style lang="less">
  .header {
    width: 100%;
    height: 50px;
    background-color: #288CE5;
    padding: 0 8px;
    position: fixed;
    top: 0;
    z-index: 999;

    color: #fff;

    .title {
      width: 60%;

      .maintitle {
      }

      .subtitle {
        margin-top: 3px;
        font-size: 12px;
        color: #BEDEF7;
      }
    }
  }
</style>
